1. Field of the Invention
The present invention relates to packet switches and routers, and more particularly, to a switching and routing method and apparatus capable of performing wire-speed switching and routing of data packets associated with a variety of network traffic protocols.
2. Description of the Related Art
Conventional network traffic is formatted into packets that are sent through the network according to destination addresses programmed in the packet header. The networking equipment used to forward such packets through a network includes routers, Layer 2 switches and Layer 3 switches. Each of these different types of equipment operate at different layers in the seven-layer OSI model. That is, for example, Layer 2 switches examine the Ethernet (MAC) addresses embedded in the packet to make forwarding decisions, while Layer 3 or “IP” switches examine the IP addresses embedded in the packet to make forwarding decisions. Both of these types of switches are good for the specific operation for which they are designed, but they can not be used to interconnect routed networks and network segments running multiple protocols such as IP and IPX that are fairly common on networks today.
Meanwhile, in the overall network, data must be routed and switched over different segments. Routers are used to interconnect different routed segments on the network. Conventional state-of-the-art routers employ general purpose CPU's to examine packet headers and to route the packets to their destinations appropriately. Although such CPU-assisted routers are able to handle the various routing protocols encountered, the processing overhead they require is substantial and this limits the rate at which traffic can be sent over the network.
A conventional network configuration is illustrated in FIG. 1. In such a configuration, Ethernet switch 10 provides a mechanism whereby dedicated 10 or 100 Mbps bandwidth is made available to nodes attached to ports 20 of switch 10. Most Ethernet switches today use Layer 2 switching. In this scheme, the switch builds a database containing the Ethernet addresses of the nodes and the ports to which they are attached. It then matches the destination Ethernet address in the packet (Layer 2 address in the seven layer OSI model) with addresses in the database to forward the packet on the port to which the destination node is connected. Most switches use some kind of hardware assistance to perform the lookup and forwarding operations at 10 or 100 Mbps wire speed.
Since Layer 2 switches use Ethernet addresses only, they are unable to provide connectivity between multiple IP or IPX networks or subnets. Nodes on IP networks are identified by IP addresses and subnet masks. Nodes on IPX networks are identified by IPX network and IPX node addresses. Since these addresses are at the network layer (Layer 3) of the seven layer OSI model, they are referred to as network addresses. Unlike Ethernet addresses that are assigned by network interface card vendors, system administrators or Internet Service Providers (ISPs) typically assign IP and IPX network addresses.
Routers such as router 30 are therefore required to connect multiple networks or subnets. Unlike switches, routers use Layer 3 addresses (network addresses) to forward packets. Routers also learn about other routers and thereby determine the different networks to which they are connected and the costs associated in reaching them. They forward the packets along the path with the lowest cost.
Since routers have to look deeper into packets and have to support different protocols with different packet formats, routing functions have been traditionally implemented mostly in software. Routers therefore can forward packets at rates of only about a tenth of those provided by Layer 2 switches. To improve performance, some routers use very high-speed processors, and some also use multiple processors and large amounts of high-speed memory. Therefore they are much more expensive than layer 2 switches. A typical routers costs per port are about seven to eight times the per port costs of a comparable Layer 2 switch.
Conventional routers, moreover, do not perform switching operations and therefore can not be used to connect networks that run non-routable protocols such as NetBios, DLC/LLC and LAT. Routers also can not be used to connect multiple nodes belonging to the same IP or IPX networks since each router interface must belong to a different IP or IPX network. Therefore, both routers and switches must be used together to form a switched internetwork, as illustrated in FIG. 1.
Recently, some switch vendors have attempted to marry the intelligence of routers with the speed of switches by adding some level of Layer 3 intelligence to their switch products, creating so-called Layer 3 switches. See, e.g., Keith Turner, “Is It A Switch Or Is It A Router,” PC Magazine, Nov. 18, 1997, pp. 269-70. However, these schemes typically support only limited numbers of protocols, may require reconfiguration of end stations and still may require external routers.
Accordingly, there remains a need in the art for a switch that can switch and route network data packets associated with a variety of protocols at high rates with substantially less processing overhead, is inexpensive, does not require any external routers to operate, and does not require any reconfiguration of end stations. The present invention fulfills this need.